home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2261 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  882 b 

  1. Path: news.ios.com!usenet
  2. From: Joshua Hoffman <jhoffman@questtech.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: VC++: help with default button
  5. Date: Tue, 16 Jan 1996 14:54:17 -0500
  6. Organization: Internet Online Services
  7. Message-ID: <30FC0269.41C67EA6@questtech.com>
  8. NNTP-Posting-Host: defiant.questtech.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0b4 (X11; I; SunOS 4.1.3 sun4c)
  13. CC: jhoffman@questtech.com
  14.  
  15. In a modeless dialog box I want to dynamically change the default
  16. button.  I tried using
  17.  
  18.    btn1->SetButtonStyle(BS_DEFPUSHBUTTON);
  19.  
  20. which did draw the heavy border around the button.  But when I press the
  21. "Enter" key from an edit control or listbox control within the dialog
  22. box the button is not "pressed".
  23.  
  24. What am I doing wrong.
  25.  
  26. Using MS Visual C++ 4.0 with MFC 4.0 under Window NT 3.51 Serive Pack 2
  27.